package org.aurora.model.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class SchedulerHashSlotInfo implements Serializable {

    private String schedulerIp;

    private int schedulerPort;

    private List<Integer> hashSlots = new ArrayList<>();

    private boolean assignSuccess;

    public SchedulerHashSlotInfo() {
    }

    public SchedulerHashSlotInfo(String schedulerIp, int schedulerPort) {
        this.schedulerIp = schedulerIp;
        this.schedulerPort = schedulerPort;
    }

    public String getSchedulerIp() {
        return schedulerIp;
    }

    public void setSchedulerIp(String schedulerIp) {
        this.schedulerIp = schedulerIp;
    }

    public int getSchedulerPort() {
        return schedulerPort;
    }

    public void setSchedulerPort(int schedulerPort) {
        this.schedulerPort = schedulerPort;
    }

    public List<Integer> getHashSlots() {
        return hashSlots;
    }

    public void setHashSlots(List<Integer> hashSlots) {
        this.hashSlots = hashSlots;
    }

    public void addHashSlot(int hashSlot) {
        this.hashSlots.add(hashSlot);
    }

    public boolean isAssignSuccess() {
        return assignSuccess;
    }

    public void setAssignSuccess(boolean assignSuccess) {
        this.assignSuccess = assignSuccess;
    }
}
